package com.ms.service.module.analysis;

import java.util.ArrayList;
import java.util.HashMap;

import com.ms.game.gmtool.message.SGmtoolGetRealTimePlayerListData;
import com.ms.service.module.analysis.message.ClientReportData;
import com.ms.service.module.analysis.message.PlayerBetData;
import com.ms.service.module.analysis.message.PlayerEnterSeatData;
import com.ms.service.module.analysis.message.SRealTimePlayerCountRequest;
import com.xpec.c4.message.MessageTypes;
import com.xpec.c4.service.annotations.MessageType;
import com.xpec.c4.service.common.BaseMessageAction;


public class AnalysisAction extends BaseMessageAction {
	
	@MessageType(typeCode = MessageTypes.S_ANALYSIS_PLAYER_ENTER_SEAT)
	public void OnPlayerEnterSeat(PlayerEnterSeatData request) {
		// machineData = null 時是出入大廳的請求
		if (request.getPlayerNameWithNumber() == null || request.getStatus() == 0) {
			return;
		}
		AnalysisProcessor.getInstance().PlayerEnterSeat(request);
	}
	
	@MessageType(typeCode = MessageTypes.S_ANALYSIS_PLAYER_BET)
	public void OnPlayerBet(PlayerBetData request){
		AnalysisProcessor.getInstance().PlayerBet(request);
	}
	
	
	@MessageType(typeCode = MessageTypes.S_CLIENT_REPORT)
	public void RecieveClientReportAfterConfirm(ClientReportData report){
		AnalysisProcessor.getInstance().recieveClientReport(report);
	}
	
	@MessageType(typeCode = MessageTypes.S_GMTOOL_GET_REAL_TIME_PLAYER_LIST_IN_GAME)
	public HashMap<String, HashMap<String, ArrayList<String>>> OnRecieveGMToolGetRealTimePlayerListInGame(SGmtoolGetRealTimePlayerListData request){
		return AnalysisProcessor.getInstance().getRealTimePlayerListInGame(request);
	}
	
	@MessageType(typeCode = MessageTypes.S_GET_REALTIME_PLAYER_COUNT_REQUEST)
	public void revRealTimePlayerCountRequest(SRealTimePlayerCountRequest request){
		AnalysisProcessor.getInstance().revRealTimePlayerCountRequest(request);
	}
	
}
